<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of project
 *
 * @author truongkx
 */
class slider extends CP_Controller{
    //put your code here
    function __construct() {
        parent::__construct('data','','Id');
    }

    function index(){
        echo $c=$this->load->view('cms/cp/02_size/viewport',$this->assigns,true);
    }
    
    function editpanel($type="CLOTHING"){
        $this->assigns->type=$type;
        $Id=(int)$this->input->post('Id');
        if($Id>0)
            $this->assigns->item=$this->backend_model->onGet($Id);
        $c=$this->load->view('cms/cp/02_size/editpanel',$this->assigns,true);
        $R["result"] = 1;
        $R["message"]='SUCCESS !';
        $R["htmlreponse"]=$c;
        $this->output->set_header('Content-type: application/json');
        $this->output->set_output(json_encode($R));
    }
    function binding_by_type($type="CLOTHING"){
		$this->backend_model->datatables_config=array(
				"table"=>"size",
				"select"=>"SELECT SQL_CALC_FOUND_ROWS * ",
				"from"=>"FROM size",
				"where"     =>"WHERE size_category_type = '$type'",
				"order_by"=>"ORDER BY `size_insert` DESC",
				"columnmaps"=>array(
						
				)
		);
		$this->bindingdata();
	}
    
    
}

?>
